package com.itheima.service.system;

import com.github.pagehelper.PageInfo;
import com.itheima.domain.system.Permission;

import java.util.List;

/**
 * @Description:service接口
 * @Param:
 * @return:
 * @Author:YangJinbo
 * @Date:2020/11/30
 */
public interface PermissionService {

    /**
     * @Description:保存
     * @Param:[permission]
     * @return:void
     * @Author:YangJinbo
     * @Date:2020/11/30
     */
    void save(Permission permission);

    /**
     * @Description:删除
     * @Param:[permission]
     * @return:void
     * @Author:YangJinbo
     * @Date:2020/11/30
     */
    void delete(Permission permission);

    /**
     * @Description:根据权限名查询
     * @Param:[permissionName]
     * @return:java.util.List<com.itheima.domain.system.Permission>
     * @Author:YangJinbo
     * @Date:2020/11/30
     */
    List<Permission> findAllByPermissionName(String permissionName);

    /**
     * @Description:查询所有
     * @Param:[pageNum, pageSize]
     * @return:com.github.pagehelper.PageInfo
     * @Author:YangJinbo
     * @Date:2020/11/30
     */
    PageInfo findAll(int pageNum, int pageSize);


    /**
     * @Description:根据id删除
     * @Param:[deleteId]
     * @return:void
     * @Author:YangJinbo
     * @Date:2020/11/30
     */
    void deleteById(List<String> deleteId);

    /**
     * @Description:根据id查询
     * @Param:[id]
     * @return:com.itheima.domain.system.Permission
     * @Author:YangJinbo
     * @Date:2020/12/1
     */
    Permission findById(String id);

}
